#gui实验
from PyQt5.QtWidgets import QApplication, QMainWindow
from PyQt5.QtGui import QIcon
import sys

from Data_analysis import zonghe, xiaoliang, pinglun
from window_echarts import Ui_mainWindow
#gui类
from Html_File import Html_file


class FirtMainWin(QMainWindow,Ui_mainWindow):
    def __init__(self, parent=None):
        super(FirtMainWin, self).__init__(parent)
        self.setupUi(self)
        self.setWindowOpacity(0.95)  # 设置窗口透明度
        #self.setAttribute(QtCore.Qt.WA_TranslucentBackground)  # 设置窗口背景透明
        # self.setWindowFlag(QtCore.Qt.FramelessWindowHint)  # 隐藏边框
        self.verticalLayout.setSpacing(0)
        #尺寸
        #self.resize(400,500)
        #底部消息提示
        #self.status = self.statusBar()
        #在底部设置时间和天气的显示，未完成
        self.statusbar.showMessage('嘻嘻的软件',50000)
        #self.showMessage('嘻嘻的软件',5000)
        #self.setupUi(self)



        # self.button1 = QPushButton('退出程序')
        # self.button1.clicked.connect(self.onclick_button)
        self.setToolTip('xx的软件')
    #     layout = QHBoxLayout()
    #     layout.addWidget(self.button1)
    #     mainFrame = QWidget()
    #     mainFrame.setLayout(layout)
    #     self.setCentralWidget(mainFrame)
    #
    # def onclick_button(self):
    #     #退出程序需要,自定义的槽
    #     sender = self.sender()
    #     print(sender.text()+'按钮被按下')
    #     app = QApplication.instance()
    #     app.quit()

if __name__ == '__main__':
    # w_c()
    # zonghe_bar(zonghe())
    # xiaoliang_bar(xiaoliang(zonghe()))
    # pinglun_bar(pinglun())#---未来将使用类--
    # price_best_pie(price_best())
    HTML = Html_file()
    exe2 = QApplication(sys.argv)
    #设置图标
    exe2.setWindowIcon(QIcon('image\图标.ico'))
    main = FirtMainWin()
    main.show()

    sys.exit(exe2.exec())